package patterns.business;

/**
 * Created by thinkpad on 16-12-11.
 * 业务代表类
 */
public class BusinessDelegate {
    private BusinessLookup lookupService = new BusinessLookup();
    private IBusinessService businessService;
    private String serviceType;
    //
    public void setServiceType(String serviceType){
        this.serviceType = serviceType;
    }
    //
    public void doTask(){
        businessService = lookupService.getBusinessService(serviceType);
        businessService.doProcessing();
    }
}
